@extends('home.layout')

@section('lunbo')
<div class="banner">
  <!--轮播 -->
	<div class="am-slider am-slider-default scoll" data-am-flexslider id="demo-slider-0">
		<ul class="am-slides">
			<li class="banner1"><a href="introduction.html"><img src="/ho/images/ad1.jpg" /></a></li>
			<li class="banner2"><a><img src="/ho/images/ad2.jpg" /></a></li>
			<li class="banner3"><a><img src="/ho/images/ad3.jpg" /></a></li>
			<li class="banner4"><a><img src="/ho/images/ad4.jpg" /></a></li>

		</ul>
	</div>
	<div class="clear"></div>
</div>
@endsection

@section('content')
<style>
.area-bg
{
	background: white;
}
#js_climit_li
{
	display: none;
}
</style>
<script>
	$('.long-title').mouseover(function(){
		$('#js_climit_li').css('display','block');
	});
</script>

	<!--侧边导航 -->
						<div id="nav" class="navfull">
							<div class="area clearfix">
								<div class="category-content" id="guide_2">
									
									<div class="category">
										<ul class="category-list" id="js_climit_li">
											@foreach($data as $k=>$v)
											<li class="appliance js_toggle relative first">
												<div class="category-info">
													<h3 class="category-name b-category-name"><i><img src="/ho/images/cake.png"></i><a class="ml-22" title="点心">{{$v['cname']}}</a></h3>
													<em>&gt;</em>
												</div>
												@foreach($v['sub'] as $kk=>$vv)
												<div class="menu-item menu-in top">
													<div class="area-in">
														<div class="area-bg">
															<div class="menu-srot">
																<div class="sort-side">
																	<dl class="dl-sort">
																		<dt><span title="蛋糕">{{$v['cname']}}</span></dt>
																		@foreach($v['sub'] as $kk=>$vv)
																		<dd><a title="{{$vv['cname']}}" href="/home/cate/{{$vv['cid']}}"><span>{{$vv['cname']}}</span></a></dd>
@endforeach
																	</dl>


																</div>

															</div>
														</div>
													</div>
												</div>
												@endforeach
											<b class="arrow"></b>	
											</li>
												@endforeach
										</ul>
									</div>
								</div>

							</div>
						</div>
						
						
						<!--轮播-->
						
						<script type="text/javascript">
							(function() {
								$('.am-slider').flexslider();
							});
							$(document).ready(function() {
								$("li").hover(function() {
									$(".category-content .category-list li.first .menu-in").css("display", "none");
									$(".category-content .category-list li.first").removeClass("hover");
									$(this).addClass("hover");
									$(this).children("div.menu-in").css("display", "block")
								}, function() {
									$(this).removeClass("hover")
									$(this).children("div.menu-in").css("display", "none")
								});
							})
						</script>



					<!--小导航 -->
					<div class="am-g am-g-fixed smallnav">
						<div class="am-u-sm-3">
							<a href="sort.html"><img src="/ho/images/navsmall.jpg" />
								<div class="title">商品分类</div>
							</a>
						</div>
						<div class="am-u-sm-3">
							<a href="#"><img src="/ho/images/huismall.jpg" />
								<div class="title">大聚惠</div>
							</a>
						</div>
						<div class="am-u-sm-3">
							<a href="#"><img src="/ho/images/mansmall.jpg" />
								<div class="title">个人中心</div>
							</a>
						</div>
						<div class="am-u-sm-3">
							<a href="#"><img src="/ho/images/moneysmall.jpg" />
								<div class="title">投资理财</div>
							</a>
						</div>
					</div>

					<!--走马灯 -->

					
					<div class="clear"></div>
				</div>
				<script type="text/javascript">
					if ($(window).width() < 640) {
						function autoScroll(obj) {
							$(obj).find("ul").animate({
								marginTop: "-39px"
							}, 500, function() {
								$(this).css({
									marginTop: "0px"
								}).find("li:first").appendTo(this);
							})
						}
						$(function() {
							setInterval('autoScroll(".demo")', 3000);
						})
					}
				</script>
			</div>
			<div class="shopMainbg">
				<div class="shopMain" id="shopmain">

					<!--今日推荐 -->

					<div class="am-g am-g-fixed recommendation">
						<div class="clock am-u-sm-3">
							<img src="/ho/images/2016.png "></img>
							<p>今日<br>推荐</p>
						</div>
						<div class="am-u-sm-4 am-u-lg-3 ">
							<div class="info ">
								<h3>真的有鱼</h3>
								<h4>开年福利篇</h4>
							</div>
							<div class="recommendationMain one">
								<a href="introduction.html"><img src="/ho/images/tj.png "></img></a>
							</div>
						</div>						
						<div class="am-u-sm-4 am-u-lg-3 ">
							<div class="info ">
								<h3>囤货过冬</h3>
								<h4>让爱早回家</h4>
							</div>
							<div class="recommendationMain two">
								<img src="/ho/images/tj1.png "></img>
							</div>
						</div>
						<div class="am-u-sm-4 am-u-lg-3 ">
							<div class="info ">
								<h3>浪漫情人节</h3>
								<h4>甜甜蜜蜜</h4>
							</div>
							<div class="recommendationMain three">
								<img src="/ho/images/tj2.png "></img>
							</div>
						</div>

					</div>
					<div class="clear "></div>
					<!--热门活动 -->

					<div class="am-container activity ">
						<div class="shopTitle ">
							<h4>活动</h4>
							<h3>每期活动 优惠享不停 </h3>
							<span class="more ">
                              <a href="# ">全部活动<i class="am-icon-angle-right" style="padding-left:10px ;" ></i></a>
                        </span>
						</div>
					  <div class="am-g am-g-fixed ">
						<div class="am-u-sm-3 ">
							<div class="icon-sale one "></div>	
								<h4>秒杀</h4>							
							<div class="activityMain ">
								<img src="/ho/images/activity1.jpg "></img>
							</div>
							<div class="info ">
								<h3>春节送礼优选</h3>
							</div>														
						</div>
						
						<div class="am-u-sm-3 ">
						  <div class="icon-sale two "></div>	
							<h4>特惠</h4>
							<div class="activityMain ">
								<img src="/ho/images/activity2.jpg "></img>
							</div>
							<div class="info ">
								<h3>春节送礼优选</h3>								
							</div>							
						</div>						
						
						<div class="am-u-sm-3 ">
							<div class="icon-sale three "></div>
							<h4>团购</h4>
							<div class="activityMain ">
								<img src="/ho/images/activity3.jpg "></img>
							</div>
							<div class="info ">
								<h3>春节送礼优选</h3>
							</div>							
						</div>						

						<div class="am-u-sm-3 last ">
							<div class="icon-sale "></div>
							<h4>超值</h4>
							<div class="activityMain ">
								<img src="/ho/images/activity.jpg "></img>
							</div>
							<div class="info ">
								<h3>春节送礼优选</h3>
							</div>													
						</div>

					  </div>
                   </div>
					<div class="clear "></div>

@foreach($data as $k=>$v)
                    <div id="f1">
					<!--甜点-->
					
					<div class="am-container ">
						<div class="shopTitle ">
							<h4>{{$v['cname']}}</h4>

							<div class="today-brands ">
								@foreach($v['sub'] as $kk=>$vv)
								<a href="/home/cate/{{$vv['cid']}}">{{$vv['cname']}}</a>
								@endforeach
							</div>
							<span class="more ">
                    <a href="# ">更多美味<i class="am-icon-angle-right" style="padding-left:10px ;" ></i></a>
                        </span>
						</div>
					</div>
					
					<div class="am-g am-g-fixed floodFour">
						<div class="am-u-sm-5 am-u-md-4 text-one list ">
							<div class="word">
								@foreach($v['sub'] as $kk=>$vv)
								<a class="outer" href="/home/cate/{{$vv['cid']}}"><span class="inner"><b class="text">{{$vv['cname']}}</b></span></a>
									@endforeach
							</div>
							<a href="# ">
								<div class="outer-con ">
									<div class="title ">
									开抢啦！
									</div>
									<div class="sub-title ">
										零食大礼包
									</div>									
								</div>
                                  <img src="/ho/images/act1.png " />								
							</a>
							<div class="triangle-topright"></div>						
						</div>
						@if(count($v['good'])>4)
						<?php
                            $v['good'] = array_slice($v['good'],0,4);
							?>
							@endif
@foreach($v['good'] as $kk=>$vv)
						<div class="am-u-sm-3 am-u-md-2 text-three big">
							<div class="outer-con ">
								<div class="title ">
									{{$vv[0]['gname']}}
								</div>
								<div class="sub-title ">

								</div>
								<i class="am-icon-shopping-basket am-icon-md  seprate"></i>
							</div>
							{{--<a href="# "><img src="/ho/images/5.jpg" /></a>--}}
							<a href="/home/good/{{$vv[0]['gid']}}"> <img src="http://lamp187mall.oss-cn-beijing.aliyuncs.com/{{$vv[0]['gphoto']}}" style="height:194px"></a>
						</div>
						@endforeach



                 <div class="clear "></div>  
                 </div>
	@endforeach
@endsection